package com.tyqx.hashchaindao.mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.tyqx.hashchainbean.module.TrackUser;
import com.tyqx.hashchainbean.vo.SysUpdaUserPwdVO;
import com.tyqx.hashchainbean.vo.SysUserModifyVO;
import com.tyqx.hashchainbean.vo.SysUserSaveVO;
import com.tyqx.hashchainbean.vo.TrackUserVO;
import hashchainutil.exception.HashchainException;
import org.apache.ibatis.annotations.Param;

public interface TrackUserMapper {
    public TrackUser getById(@Param(value = "id") Long userId)throws Exception;

    public TrackUser getTrackUserByUserName(@Param("userName")String userName)throws Exception;

    public List<TrackUser>	getListByMap(Map<String, Object> param)throws Exception;

    public Integer getCountByMap(Map<String, Object> param)throws Exception;

    public Integer save(TrackUser trackUser)throws HashchainException;

    public Integer modify(SysUserModifyVO sysUserModifyVO)throws HashchainException;

    public Integer removeById(@Param(value = "userId") Long userId)throws Exception;

    public List<TrackUser> getTrackUserListByMap(Map<String, Object> param)throws Exception;


    public Integer updateActivate(@Param("userActivate") Integer userActivate, @Param("userId") Long userId);

    //更新系统用户信息
    public Integer getUserModify(TrackUser sysUser);

    //更改用户密码
    public Integer updateUserPwdById(SysUpdaUserPwdVO sysUpdaUserPwdVO);

    //sys页面删除按钮
    public Integer delActivate(@Param("userActivate") Integer userActivate, @Param("userId") Long userId);



    public int add(TrackUser trackUser);

    public TrackUser selectTrackUser(@Param("userName") String userName);









    //新增注册用户
    public Integer saveNewUser(TrackUser user) throws Exception;

    //通过用户账号查找用户
    public TrackUserVO userLand(@Param("userName") String userName)throws HashchainException;

    public TrackUser getUserByName(@Param("userName") String userName)throws HashchainException;

    //通过id删除用户()
    public Integer deleteUserById(@Param("userId")String userId)throws HashchainException;

    //更改用户状态(is_logout为1
    public Integer updateIsLogoutById(@Param("userId")String userId)throws HashchainException;

    public Integer updateLoginTime(@Param("userId")String userId,@Param("loginTime") Date loginTime)throws HashchainException;
}